{% extends "novel/base.html" %}

{% block style %}
    <style>

        .blog-masonry {
            height: auto !important;
        }

        .list-group li {
            magin-top: 50px !important;
        }

        .list-group li a {
            padding: 10px 50px !important;
            color: white !important;
        }

        .list-group li a:hover {
            color: black !important;
        }

        .list-group-item {
            position: relative !important;
            display: block !important;
            margin: 10px 10px !important;
            background-color: #95948c !important;
            border: 1px solid #ddd !important;
        }

        body {
            background-color: #f7f7f7 !important;
        }


    </style>
{% endblock %}


{{ super() }}

{% block div %}
    <ul class="list-group">

        {% for chapter in chapters %}
            <li class="list-group-item">
                <a href="{{ url_for('novel.content',chapter_id=chapter.id) }}">{{ chapter.chapter_name }}</a>
            </li>
        {% endfor %}

    </ul>

    <div class="pagination">
        <div class="pagination">
            <div class="pagination">
                <ul class="pagination">
                    <li {% if not pagination.has_prev %}class="disabled"{% endif %}>
                        <a href="


                                {% if pagination.has_prev %}{{ url_for('novel.show_chapters',novel_id=novel.id,page=pagination.prev_num) }}{% else %}#{% endif %}">
                            &laquo;上一页
                        </a>
                    </li>
                    {% for p in pagination.iter_pages() %}
                        {% if p %}
                            {% if p == pagination.page %}
                                <li class="active">
                                    <a href="{{ url_for('novel.show_chapters',novel_id=novel.id,page = p) }}">{{ p }}</a>
                                </li>
                            {% else %}
                                <li>
                                    <a href="{{ url_for('novel.show_chapters',novel_id=novel.id,page = p) }}">{{ p }}</a>
                                </li>
                            {% endif %}
                        {% else %}
                            <li class="disabled"><a href="#">&hellip;</a></li>
                        {% endif %}
                    {% endfor %}
                    <li {% if not pagination.has_next %}class="disabled"{% endif %}>
                        <a href="


                                {% if pagination.has_next %}{{ url_for('novel.show_chapters',novel_id=novel.id,page=pagination.next_num) }}{% else %}#{% endif %}">
                            下一页&raquo;
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>


{% endblock %}

